<?php
$ip = '69.89.31.224';
$link = "http://api.ipinfodb.com/v3/ip-city/?key=489a68d8c172aa3248dcd791773a68d54539626aafeb5b13c61bfcb24ef74c5e&format=json&ip=".$ip;
$rs = file_get_contents($link);
//$fp = fsockopen($link, 80, $errno, $errstr, 30);
/* if (!$fp) {
	echo "$errstr ($errno)<br />\n";
} else {
$out = "GET / HTTP/1.1\r\n";
		$out .= "Host: www.example.com\r\n";
    $out .= "Connection: Close\r\n\r\n";
    fwrite($fp, $out);
    while (!feof($fp)) {
    echo fgets($fp, 128);
    }
    fclose($fp);
} */

echo $rs;

//apikey: 489a68d8c172aa3248dcd791773a68d54539626aafeb5b13c61bfcb24ef74c5e
?>
<!DOCTYPE html>
<html>
  <head>
   
  </head>
  <body>
    <div id="map-canvas" style="width:400px; height:400px"><img src="https://maps.google.com/maps/api/staticmap?sensor=false&amp;size=300x300&amp;markers=size:mid|color:blue|label:1|41.5067,-83.1466&amp;markers=color:black|label:0|41.5067,-83.1466"></div>
  </body>
</html>
